package com.yidu.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;

import com.yidu.action.vo.TreeNode;
import com.yidu.model.SnComType;

public interface SnComTypeMapper {
	
    /**
     * 查询所有
     * @param maps 
     * @return 商品类型model集合
     */
	 public List<SnComType> queryAll(Map<String, Object> maps);
	/**
	 * 删除类型
	 * @param typeId 类型ID
	 * @return 行数查询
	 */
	//@Delete("delete from sn_com_type where type_id = #{id}")
    public int delete(String typeId);
	
	
	/**
	 * 修改类型
	 * @param type 类型对象
	 * @return rows 修改的行数
	 */
	//@Update("update sn_com_type set type_name = #{typeName,jdbcType=VARCHAR},sn_type_id = #{snTypeId,jdbcType=VARCHAR},type_ids = #{typeIds,jdbcType=VARCHAR}  where type_id= #{typeId}")
	public SnComType findById(String typeId);
	
	public int findCount(Map<String, Object> maps);
	
	/**
	 * 修改
	 * @param comType
	 * @return
	 */
	public int updateByPrimaryKeySelective(SnComType comType);
	/**
	 * 增加
	 * @param comType
	 * @return
	 */
	public int insertSelective(SnComType comType);
	
	public SnComType selectByPrimaryKey(String typeId);
	@Select("select type_id as typeId,type_name as typeName from sn_com_type where isva='1' ")
	public List<SnComType> query();
}